package org.bob.learn.web.controller;

import org.bob.learn.dao.entity.Hotel;
import org.bob.learn.service.HotelService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hotel")
public class HotelController {

    private final HotelService hotelService;

    public HotelController(HotelService hotelService) {
        this.hotelService = hotelService;
    }

    @GetMapping("/get")
    Hotel queryById(String id){
       return hotelService.qryById(id);
    }
}
